import request from "@/utils/requset";

// 获取图书分类列表
export const getCategoryListApi = (): any =>
  request({
    method: "get",
    url: "/category/select_list",
  });
// 获取图书分类分页列表
export const getCategoryPageListApi = (data: any): any =>
  request({
    method: "post",
    url: "/category/list",
    data,
  });

// 添加图书分类分
export const AddCategoryApi = (data: any): any =>
  request({
    method: "post",
    url: "/category/add",
    data,
  });
// 修改图书分类分
export const updateCategoryApi = (id: number, data: any): any =>
  request({
    method: "Patch",
    url: "/category/update/" + id,
    data,
  });
// 删除图书类型
export const delCategoryApi = (id: number): any =>
  request({
    method: "delete",
    url: "/category/add" + id,
  });
